% clear all
% mm_solt_width = 2500;
% load Vt_Step2_2500.mat
% load Bus_soltInfo.mat
% sim('offline_cal_discrete');
% run GetDiscretePoints
% DiscreteX_End_2500 = DiscreteX;
% DiscreteY_End_2500 = DiscreteY;
% DiscreteYaw_End_2500 = DiscreteYaw;
% DiscreteCur_End_2500 = DiscreteCur;
% Discrete_StartX_2500 = StartX;
% Discrete_StartY_2500 = StartY;
% Discrete_StartYaw_2500 = StartYaw;
% Discrete_StartCur_2500 = StartCur;
% Discrete_StartIndex_2500 = StartIndex;
% DiscreteNum_2500 = DiscreteNum;
% save('DiscretePoint_2500','Discrete*');
% save('ans_Discrete_2500','ans');

clear all
mm_solt_width = 2600;
load Vt_Step2_2600.mat
load Bus_soltInfo.mat
sim('offline_cal_discrete');
run GetDiscretePoints
DiscreteX_End_2600 = DiscreteX;
DiscreteY_End_2600 = DiscreteY;
DiscreteYaw_End_2600 = DiscreteYaw;
DiscreteCur_End_2600 = DiscreteCur;
Discrete_StartX_2600 = StartX;
Discrete_StartY_2600 = StartY;
Discrete_StartYaw_2600 = StartYaw;
Discrete_StartCur_2600 = StartCur;
Discrete_StartIndex_2600 = StartIndex;
DiscreteNum_2600 = DiscreteNum;
save('DiscretePoint_2600','Discrete*');
save('ans_Discrete_2600','ans');

clear all
mm_solt_width = 2700;
load Vt_Step2_2700.mat
load Bus_soltInfo.mat
sim('offline_cal_discrete');
run GetDiscretePoints
DiscreteX_End_2700 = DiscreteX;
DiscreteY_End_2700 = DiscreteY;
DiscreteYaw_End_2700 = DiscreteYaw;
DiscreteCur_End_2700 = DiscreteCur;
Discrete_StartX_2700 = StartX;
Discrete_StartY_2700 = StartY;
Discrete_StartYaw_2700 = StartYaw;
Discrete_StartCur_2700 = StartCur;
Discrete_StartIndex_2700 = StartIndex;
DiscreteNum_2700 = DiscreteNum;
save('DiscretePoint_2700','Discrete*');
save('ans_Discrete_2700','ans');

clear all
mm_solt_width = 2800;
load Vt_Step2_2800.mat
load Bus_soltInfo.mat
sim('offline_cal_discrete');
run GetDiscretePoints
DiscreteX_End_2800 = DiscreteX;
DiscreteY_End_2800 = DiscreteY;
DiscreteYaw_End_2800 = DiscreteYaw;
DiscreteCur_End_2800 = DiscreteCur;
Discrete_StartX_2800 = StartX;
Discrete_StartY_2800 = StartY;
Discrete_StartYaw_2800 = StartYaw;
Discrete_StartCur_2800 = StartCur;
Discrete_StartIndex_2800 = StartIndex;
DiscreteNum_2800 = DiscreteNum;
save('DiscretePoint_2800','Discrete*');
save('ans_Discrete_2800','ans');

clear all
mm_solt_width = 2900;
load Vt_Step2_2900.mat
load Bus_soltInfo.mat
sim('offline_cal_discrete');
run GetDiscretePoints
DiscreteX_End_2900 = DiscreteX;
DiscreteY_End_2900 = DiscreteY;
DiscreteYaw_End_2900 = DiscreteYaw;
DiscreteCur_End_2900 = DiscreteCur;
Discrete_StartX_2900 = StartX;
Discrete_StartY_2900 = StartY;
Discrete_StartYaw_2900 = StartYaw;
Discrete_StartCur_2900 = StartCur;
Discrete_StartIndex_2900 = StartIndex;
DiscreteNum_2900 = DiscreteNum;
save('DiscretePoint_2900','Discrete*');
save('ans_Discrete_2900','ans');

clear all
mm_solt_width = 3000;
load Vt_Step2_3000.mat
load Bus_soltInfo.mat
sim('offline_cal_discrete');
run GetDiscretePoints
DiscreteX_End_3000 = DiscreteX;
DiscreteY_End_3000 = DiscreteY;
DiscreteYaw_End_3000 = DiscreteYaw;
DiscreteCur_End_3000 = DiscreteCur;
Discrete_StartX_3000 = StartX;
Discrete_StartY_3000 = StartY;
Discrete_StartYaw_3000 = StartYaw;
Discrete_StartCur_3000 = StartCur;
Discrete_StartIndex_3000 = StartIndex;
DiscreteNum_3000 = DiscreteNum;
save('DiscretePoint_3000','Discrete*');
save('ans_Discrete_3000','ans');